package edu.mtu.citizenscience.cs.sdk.uploader.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/**
 * @author Corbin Uselton <corbinu@cwuselto@mtu.edu>
 * @copyright (c) 2012 MichiganTech <http://www.mtu.edu>
 * @since 1.0
 * 
 * Opens the app db so the data can be stripped out and uploaded
 */
public class UploadDBHelper extends SQLiteOpenHelper {
	
	/**
	 * Create the DB helper
	 * 
	 * @param   context - Context - the context to open the DB with
	 * @param   dbName - dbName - the name of the DB to strip
	 * @param   version - int - the DB version
	 * @return	void
	 */
	public UploadDBHelper(Context context, String dbName, int version)
	{
		// create the android DB helper
		super(context, dbName + ".db", null, version);
	}

	/**
	 * Called when the DB is created. Is not used by the uploader
	 * 
	 * @param   db - SQLiteDatabase - the SQL db
	 * @return	void
	 */
	@Override
	public void onCreate(SQLiteDatabase db) {  }

	/**
	 * Called when the DB is updated. Is not used by the uploader
	 * 
	 * @param   db - SQLiteDatabase - the SQL db
	 * @param	oldVer - int - old db version
	 * @param	newVer - int - new db version
	 * @return	void
	 */
	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVer, int newVer) {  }
	
}
